package com.hxl.tech.gateway.auth.config;

import com.querydsl.jpa.impl.JPAQueryFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;


/**
 * QueryDSL配置
 * @author soliddq
 * @date 2023-09-20
 */
@Configuration
public class JPAQueryConfig {

    @PersistenceContext
    EntityManager entityManager;

    @Bean
    public JPAQueryFactory jpaQuery(EntityManager entityManager) {

        return new JPAQueryFactory(entityManager);
    }

}
